<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
  </div>
  <script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
  <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
  <script crossorigin src="https://cdn.bootcss.com/babel-standalone/6.26.0/babel.min.js"></script>
  <script type="text/babel">
    //1.定义组件

    class Modal extends React.Component {
      render () {
        return (
          <fieldset>
            <legend>自定义遮罩框</legend>
            每次调用传递不同数据进来
            <hr />
            {this.props.children}
          </fieldset>
        )
      }
    }


    //2.渲染组件
    ReactDOM.render(<div>
      <Modal> <font color='red'>删除成功</font></Modal>
    </div>, document.querySelector('#app'))

  </script>

</body>

</html>